#include<iostream>
using namespace std;
int a[10000];

void qsort(int a[], int l, int r)
{
    if (l >= r)
        return;
    int x = a[(r + l) >> 1 ];
    int i = l - 1;
    int j = r + 1;
    while (i < j)
    {
        do j--; while (a[j] > x);
        do i++; while (a[i] < x);
       

        if (i < j)
        {
            swap(a[i], a[j]);
        }
    }

    qsort(a, l, j),qsort(a, j+1, r );
}
int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }
    qsort(a, 0, n - 1);
    for (int i = 0; i < n; ++i)
    {
        cout << a[i] << " ";
    }

}
